package ai.moran.demo.thrift;

import com.alibaba.fastjson.JSON;
import org.apache.thrift.TException;

/**
 * @author zhuhaitao
 * @email zhuhaitao@imoran.net
 * @date 2020/12/7 1:41 下午
 */
public class UserInfoServiceImpl implements UserInfoService.Iface{
    @Override
    public UserInfo getUserInfoById(int userid) throws TException {
        UserInfo userInfo =new UserInfo();
        userInfo.setUserId(2);
        return userInfo;
    }

    @Override
    public String getUserNameById(int userid) throws TException {
        UserInfo userInfo =new UserInfo();
        userInfo.setUserId(2);
        return JSON.toJSONString(userInfo);
    }

    @Override
    public int getUserCount() throws TException {
        return 0;
    }

    @Override
    public boolean checkUserById(int userid) throws TException {
        return false;
    }
}
